<?php
	ob_start();
	session_start(1);
	date_default_timezone_set('Asia/Bangkok'); // Set Time Zone required tu PHP 5	
	define('ACCESS', true);
	require_once 'define.php';
	require_once ROOT_PATH.DS.'config.php';
	require_once ROOT_PATH.DS.'includes'.DS.'database.class.php';
	require_once ROOT_PATH.DS.'includes'.DS.'system.input.php';
    require_once ROOT_PATH.DS.'includes'.DS.'user.current.php';
    require_once ROOT_PATH.DS.'includes'.DS.'system.url.php';
	$master = ObjInput::get('portal','str','');
	if($master)
	{
		$path = ROOT_PATH.DS.'pages'.DS.'master'.DS.$master.'.php';
		if (file_exists($path))
			require_once $path;
		else
			echo "Trang khong ton tai!";
	}
	else
	{
		$path = ROOT_PATH.DS.'pages'.DS.'master'.'frontend.php';		
		if (file_exists($path))
			require_once $path;
		else
			echo "Trang khong ton tai!";
	}
	
?>

